<!--
@author	Yi Bo <etng2004@gmail.com>
@version	$Id: contact_edit.php 36 2007-09-01 02:34:38Z etng2004 $
@copyrithg	2006-2007 ETE.CN
@license 	PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
-->
<?php
$this->declareVars();
require_once(dirname(__FILE__) . '/_meta_contact.php');
echo $this->render('header.php');
//$this->dump($$this->contact);
$contact = $this->contact;
?>

<form action="<?php echo $this->base_url; ?>/edit/" method="post" enctype="multipart/form-data" name="frmEditcontact" id="frmEditcontact">
  <input type="hidden" name="fields[id]" value="<?php echo $contact['id'];?>"/>
  <input type="hidden" name="fields[client_id]" value="<?php echo $contact['client_id'];?>"/>
  <table cellpadding="0" cellspacing="0" border="0">
    <tr class="tblhead">
      <td colspan="2">修改</td>
    </tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['name'];?>：</td>
	<td width="85%"><input type="text" name="fields[name]" value="<?php echo $contact['name'];?>" id="field_name" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['email'];?>：</td>
	<td width="85%"><input type="text" name="fields[email]" value="<?php echo $contact['email'];?>" id="field_email" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['gender'];?>：</td>
	<td width="85%">		<?php
	echo $this->formRadio('fields[gender]', $contact['gender'], array('id'=>'field_gender'), $LANG['GENDER'], '&nbsp;');
	?>
	</td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['marriage'];?>：</td>
	<td width="85%">
	<?php
	echo $this->formRadio('fields[marriage]', $contact['marriage'], array('id'=>'field_marriage'), $LANG['MARRIAGE'], '&nbsp;');
	?>
	</td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['nation'];?>：</td>
	<td width="85%"><input type="text" name="fields[nation]" value="<?php echo $contact['nation'];?>" id="field_nation" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['address'];?>：</td>
	<td width="85%"><input type="text" name="fields[address]" value="<?php echo $contact['address'];?>" id="field_address" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['city'];?>：</td>
	<td width="85%"><input type="text" name="fields[city]" value="<?php echo $contact['city'];?>" id="field_city" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['msn'];?>：</td>
	<td width="85%"><input type="text" name="fields[msn]" value="<?php echo $contact['msn'];?>" id="field_msn" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['qq'];?>：</td>
	<td width="85%"><input type="text" name="fields[qq]" value="<?php echo $contact['qq'];?>" id="field_qq" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['phone'];?>：</td>
	<td width="85%"><input type="text" name="fields[phone]" value="<?php echo $contact['phone'];?>" id="field_phone" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['cellphone'];?>：</td>
	<td width="85%"><input type="text" name="fields[cellphone]" value="<?php echo $contact['cellphone'];?>" id="field_cellphone" /></td>
</tr>
        	<tr class="tblbody">
	<td width="15%"><?php echo $meta['contact']['fields']['memo'];?>：</td>
	<td width="85%">
	<?php
	echo $this->fckeditor('fields[memo]', $contact['memo'], 'Basic');
	?></td>
</tr>

    <tr class="tblfoot">
      <td colspan="2" align="center"><input type="submit" value="发布" /></td>
    </tr>
  </table>
</form>
<div class="develop_notice">
<textarea name="CRMLiteDevelopCode" rows="10" cols="50" wrap="off" onfocus="this.select();">
<table>
  <?php
        foreach ($contact as $field => $value):
	?>
	<tr class="tblbody">
	<td width="15%">&lt;?php echo $meta['contact']['fields']['<?php echo $field; ?>'];?&gt;：</td>
	<td width="85%"><input type="text" name="fields[<?php echo $field; ?>]" value="&lt;?php echo $contact['<?php echo $field; ?>'];?&gt;" id="field_<?php echo $field; ?>" /></td>
</tr>
        <?php
        endforeach;
	?>
</table>
</textarea>
</div>
<script type="text/javascript">
	$(document).ready(function () {

	});
</script>
<?php echo $this->render('footer.php');?>